﻿using System;
using System.Collections.Generic;
using System.Text;
using Castle.ActiveRecord;
using Castle.Components.Validator;
using Wolfut.MirageEE.Domain.CommonUtilities;
using MiragePWF.NH.Validation;
using Wolfut.MirageEE.Kernal.Common;

namespace Wolfut.MirageEE.Domain.Common
{
    [ActiveRecord("SUBJECTS")]
    public class Subject : PersistentObjectWithGuid
    {
        #region 代码
        [Property("SUBJECTS_CODE")]
        [ValidateNonEmpty, ValidateLength(0, 100, "代码超长")]
        public virtual string SubjectCode
        {
            get
            {
                return subjectCode;
            }
            set
            {
                subjectCode = value;
            }
        }
        private string subjectCode;
        #endregion

        #region 汇率
        [Property("RATES")]
        public virtual decimal Rates
        {
            get
            {
                return rates;
            }
            set
            {
                rates = value;
            }
        }
        private decimal rates;
        #endregion

        #region 名称
        [Property("SUBJECT_NAME")]
        [ValidateLength(0, 40, "名称超长")]
        public virtual string MoneyName
        {
            get
            {
                return moneyName;
            }
            set
            {
                moneyName = value;
            }
        }
        private string moneyName;
        #endregion

        #region 类别
        [Property("CATEGORY")]
        [ValidateLength(0, 40, "类别超长")]
        public virtual string Category
        {
            get
            {
                return category;
            }
            set
            {
                category = value;
            }
        }
        private string category;
        #endregion

        #region 外币核算
        [Property("CHECK_FOREIGN_CURRENCY")]
        [ValidateNonEmpty, ValidateLength(0, 20, "外币核算超长")]
        public virtual string CheckForeignCurrency
        {
            get
            {
                return checkForeignCurrency;
            }
            set
            {
                checkForeignCurrency = value;
            }
        }
        private string checkForeignCurrency;
        #endregion

        #region 期末调汇
        [Property("TERMINAL_ADJUST")]
        [ValidateNonEmpty]
        public virtual Int16 AdjustERPeriodly
        {
            get
            {
                return adjustERPeriodly;
            }
            set
            {
                adjustERPeriodly = value;
            }
        }
        private Int16 adjustERPeriodly;
        #endregion

        #region 余额方向
        [Property("BALANCE_DIRECTION")]
        [ValidateNonEmpty]
        public virtual OnLoanFlag BalanceDirect
        {
            get
            {
                return balanceDirect;
            }
            set
            {
                balanceDirect = value;
            }
        }
        private OnLoanFlag balanceDirect;
        #endregion

        #region 辅助核算
        [Property("ASSIST_CHECKING")]
        public virtual string AssistChecking
        {
            get
            {
                return assistChecking;
            }
            set
            {
                assistChecking = value;
            }
        }
        private string assistChecking;
        #endregion

        #region 应收/应付受控科目
        [Property("CONTROL_SUBJECT")]
        public virtual Int16 ControlSubject
        {
            get
            {
                return controlSubject;
            }
            set
            {
                controlSubject = value;
            }
        }
        private Int16 controlSubject;
        #endregion

        #region 科目类别
        [Property("SUBJECT_CATEGORY")]
        [ValidateNonEmpty]
        public virtual Int16 SubjectCategory
        {
            get
            {
                return subjectCategory;
            }
            set
            {
                subjectCategory = value;
            }
        }
        private Int16 subjectCategory;
        #endregion

        #region 是否删除
        [Property("IS_DELETED")]
        [ValidateNonEmpty]
        public virtual bool IsDeleted
        {
            get
            {
                return isDeleted;
            }
            set
            {
                isDeleted = value;
            }
        }
        private bool isDeleted;
        #endregion
    }
}
